﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HANS.Utility.Extensions;

namespace HANS_Base.Services
{


    public class FileSaveRuleServices
    {



        public const string AdminFaceImageSavePath= "~/uploads/adminFaceImage/";


        #region 生成Rule
        /// <summary>
        /// 按月生成路径
        /// </summary>
        /// <param name="basePath"></param>
        /// <param name="param1"></param>
        /// <returns></returns>
        public static string GetMonthlyPath(string basePath)
        {
            return string.Format(basePath, DateTime.Now.ToString("yyyyMM").GetMD5Hash());
        }

        /// <summary>
        /// 按日生成路径
        /// </summary>
        /// <param name="basePath"></param>
        /// <returns></returns>
        public static string GetDailyPath(string basePath)
        {
            return string.Format(basePath, DateTime.Now.ToString("yyyyMMdd").GetMD5Hash());
        }
        #endregion
    }
}
